import request from '../utils/request'

export const create = (data) => {
    return request(
        '/address',
        {
            method: 'PUT',
            data
        }
    )
}

export const find = (openid) => {
    return request(
        `/address?openid=${openid}`,
        {
            method: 'GET'
        }
    )
}

export const update = (data) => request(
    '/address',
    {
        method: 'POST',
        data
    }
)
export const del = (id) => request(
    `/address?id=${id}`,
    {
        method: 'DELETE',
    }
)